﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;

namespace YTSK.FrmSH
{
    public partial class FrmYSDZFPFail : Form
    {
        public FrmYSDZFPFail()
        {
            InitializeComponent();
        }

        public void SetErrMsg(string caption, string err)
        {
            this.LabCaption.Text = caption;
            this.tbTip.Text = err;
            FrmYSDZFPFail_Resize(null, null);
        }

        private void FrmYSDZFPFail_Resize(object sender, EventArgs e)
        {
            if(this.Height>200)
            {
                this.tbTip.Height = this.Height - 150;
                this.btLogin.Top = this.Height - 100;
            }
            if(this.Width>200)
            {
                this.tbTip.Width = this.Width - 150;
                this.btLogin.Left = this.Width*2 / 3;
            }
        }

        private void btLogin_Click(object sender, EventArgs e)
        {
            this.Close();
        }
    }
}
